package cn.quevo.ucenter.core.token.impl;

import cn.quevo.ucenter.core.token.MD5TokenGenerate;
import cn.quevo.ucenter.core.token.OAuthIssuer;
import cn.quevo.ucenter.core.token.TokenGenerate;
/**
 * Token生成实现
 * 
 * @author July july_sky@foxmail.com
 * @date 2018年3月28日 下午2:24:31
 * @Copyright ©2015-2035 湘豫(北京)科技有限公司. All Rights Reserved.
 * @version 1.0
 */
public class OAuthIssuerImpl implements OAuthIssuer{

    private TokenGenerate tokenGenerate;
    
    public OAuthIssuerImpl() {
        this(new MD5TokenGenerate());
    }
    
    public OAuthIssuerImpl(TokenGenerate tokenGenerate) {
        this.tokenGenerate = tokenGenerate;
    }
    @Override
    public String accessToken() {
        return this.tokenGenerate.generateToken();
    }

    @Override
    public String refreshToken() {
        return this.tokenGenerate.generateToken();
    }

    @Override
    public String authorizationCode() {
        return this.tokenGenerate.generateToken();
    }
}
